<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;
use think\Session;
use think\Validate;


class Eva extends Controller
{
	/**
     * 首页
    */
    public function evalist()
    {
        
        $param = $this->request->get();
        $where = [];
        if(!empty($param['evaTime'])){
            $where['evaTime'] = $param['evaTime'];
        }
        $data = Db::name('eva')
            ->order('id asc')
            ->where($where)
            ->paginate(12);
        $this->assign('evas', $data);
        return $this->fetch();
    }
    

    public function deleteEva()
    {
        $id = $this->request->post('id');

        
        $delete1 = Db::name('eva')
	        ->where('id', $id)
	        ->delete();
	   
        $this->success('删除成功');
    }
    
}